﻿using System;
namespace Samurai.Wakizashi.Workflow
{
    public class WorkflowStepCompletedEventArgs<T> : EventArgs where T : class, IWorkflowContext 
    {
        /// <summary>
        /// Gets or sets the context as it existed when the step completed.
        /// </summary>
        /// <value>The context.</value>
        public T Context { get; set; }

        /// <summary>
        /// Gets or sets the exception that occured during workflow execution.
        /// </summary>
        /// <value>The exception.</value>
        public Exception Exception { get; set; }

        /// <summary>
        /// Gets or sets the failed workflow step.
        /// </summary>
        /// <value>The failed workflow step.</value>
        public IWorkflowStep<T> FailedWorkflowStep { get; set; }
    }
}
